package dymnd.net;

import java.awt.Color;
import java.awt.geom.Rectangle2D;
import java.io.Serializable;
import java.util.Hashtable;

public class Packet implements Serializable{
	
	public static final long serialVersionUID = 0x01;
	
	public static final int PACKET_TYPE_PLUGIN = 0;
	public static final int PACKET_TYPE_QUERY = 1;
	public static final int PACKET_TYPE_NATIVE = 2;
	//public static final int PACKET_TYPE_ = 0;
	
	public static final int MOUSE_ACTION_PRESSED = 0;
	public static final int MOUSE_ACTION_RELEASED = 1;
	public static final int MOUSE_ACTION_HOVERED = 2;
	
	
	public static final int NATIVE_ADD_LAYER = 0;
	
	
	
	public int x = 0;
	public int y = 0;
	
	public int lastX = 0;
	public int lastY = 0;
	
	public int width = 0;
	public int height = 0;
	
	public int packetType = PACKET_TYPE_PLUGIN;
	
	public int mouseAction = MOUSE_ACTION_PRESSED;
	
	public long pluginHash = -1;
	
	///this string is used to store custom values
	public Hashtable<String, Object> pluginDefined = new Hashtable<String, Object>();
	
	public String username = "noname";
	
	public int nativeCommand = -1;
	
	public double pressure = -1;
	
	public int layerIndex = -1;
	
	public int radius = -1;
	
	public Color primaryColor = Color.black;
	public Color secondaryColor = Color.white;
	
	private boolean enabled = true;
	
	public boolean isEnabled()	{
		return enabled;
	}
	
	public Rectangle2D bounds = null;
	
	public void setEnabled(boolean b)	{
		enabled = b;
	}
	
}
